package com.vogue.supplymall.order.domain.mapper;

import com.vogue.supplymall.order.domain.model.Fulfillment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * The type Fulfillment mapper.
 *
 * @aouthor: zhangliang
 * @date: Create in 2018-02-05
 */
@Mapper
public interface FulfillmentMapper extends BaseMapper<Fulfillment, Long> {
    /**
     * Gets fulfillment for refund.
     *
     * @param refundId the refund id
     * @return the fulfillment for refund
     */
    @Select("select COUNT(ff.id) count from fulfillment ff where ff.orderid = #{refundId}")
    Integer getFulfillmentForRefund(Long refundId);
}
